package com.suray.wcs.service.test.action.checkmap.type;

public enum RgvDirection {
    ONE(1,"1方向"),
    TWO(2,"2方向"),
    THREE(3,"3方向"),
    FOUR(4,"4方向"),
    ;

    int value;
    String des;
    RgvDirection(int value, String des) {
        this.value = value;
        this.des = des;
    }

    public int getValue() {
        return value;
    }

    public static RgvDirection parseDirection(int value) {
        for (RgvDirection rgvDirection : RgvDirection.values()) {
            if (rgvDirection.value == value) {
                return rgvDirection;
            }
        }

        throw new RuntimeException("小车行驶方向无法解析：" + value);
    }

    @Override
    public String toString() {
        return des;
    }
}
